x86/iommu: introduce a cache sync hook
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jul 2020 13:22:47 +0000 (15:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 13:22:47 +0000 (15:22 +0200)
commit8bf72ea432bb078d9483639d4bf9b756333374a9
treebe287b0356fc230fb9db66b7792c1468537959ca
parent2d11e6d694877620d7784a0bcebf9e869d41a14c
x86/iommu: introduce a cache sync hook

The hook is only implemented for VT-d and it uses the already existing
iommu_sync_cache function present in VT-d code. The new hook is
added so that the cache can be flushed by code outside of VT-d when
using shared page tables.

Note that alloc_pgtable_maddr must use the now locally defined
sync_cache function, because IOMMU ops are not yet setup the first
time the function gets called during IOMMU initialization.

No functional change intended.

This is part of XSA-321.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 91526b460e5009fc56edbd6809e66c327281faba
master date: 2020-07-07 14:38:34 +0200
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/include/asm-x86/iommu.h
xen/include/xen/iommu.h